<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Chapter 33. Boost.Signals2</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="ratio/appendices.html" title="Appendices">
<link rel="next" href="signals2/tutorial.html" title="Tutorial">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ratio/appendices.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="signals2/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="signals2"></a>Chapter 33. Boost.Signals2</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Douglas</span> <span class="surname">Gregor</span>
</h3></div></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Frank</span> <span class="othername">Mori</span> <span class="surname">Hess</span>
</h3></div></div>
<div><p class="copyright">Copyright © 2001-2004 Douglas Gregor</p></div>
<div><p class="copyright">Copyright © 2007-2009 Frank Mori Hess</p></div>
<div><div class="legalnotice">
<a name="id-1.3.34.1.5"></a><p>Distributed under the Boost
    Software License, Version 1.0. (See accompanying file
    <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
</div></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="signals2.html#id-1.3.34.3">Introduction</a></span></dt>
<dd><dl><dt><span class="section"><a href="signals2.html#id-1.3.34.3.5">Signals2</a></span></dt></dl></dd>
<dt><span class="section"><a href="signals2/tutorial.html">Tutorial</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="signals2/tutorial.html#id-1.3.34.4.2">How to Read this Tutorial</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#id-1.3.34.4.3">Hello, World! (Beginner)</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#id-1.3.34.4.4">Calling Multiple Slots</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#id-1.3.34.4.5">Passing Values to and from Slots</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#id-1.3.34.4.6">Connection Management</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#signals2.tutorial.document-view">Example: Document-View</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#signals2.tutorial.extended-slot-type">Giving a Slot Access to its Connection (Advanced)</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#signals2.tutorial.signal-mutex-template-parameter">Changing the <code class="computeroutput">Mutex</code> Type of a Signal (Advanced).</a></span></dt>
<dt><span class="section"><a href="signals2/tutorial.html#id-1.3.34.4.10">Linking against the Signals2 library</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="signals2/examples.html">Example programs</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="signals2/examples.html#signals2.examples.misc">Miscellaneous Tutorial Examples</a></span></dt>
<dt><span class="section"><a href="signals2/examples.html#signals2.examples.document-view">Document-View</a></span></dt>
<dt><span class="section"><a href="signals2/examples.html#signals2.examples.deconstruct">Postconstructors and Predestructors with <code class="computeroutput">deconstruct()</code></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="signals2/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2_hpp">Header &lt;boost/signals2.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.connection_hpp">Header &lt;boost/signals2/connection.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.deconstruct_hpp">Header &lt;boost/signals2/deconstruct.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.dummy_mutex_hpp">Header &lt;boost/signals2/dummy_mutex.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.last_value_hpp">Header &lt;boost/signals2/last_value.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.mutex_hpp">Header &lt;boost/signals2/mutex.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.optional_last_value_hpp">Header &lt;boost/signals2/optional_last_value.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.shared_connection_block_hpp">Header &lt;boost/signals2/shared_connection_block.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.signal_hpp">Header &lt;boost/signals2/signal.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.signal_base_hpp">Header &lt;boost/signals2/signal_base.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.signal_type_hpp">Header &lt;boost/signals2/signal_type.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.slot_hpp">Header &lt;boost/signals2/slot.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.slot_base_hpp">Header &lt;boost/signals2/slot_base.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.trackable_hpp">Header &lt;boost/signals2/trackable.hpp&gt;</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="signals2/thread-safety.html">Thread-Safety</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="signals2/thread-safety.html#id-1.3.34.7.2">Introduction</a></span></dt>
<dt><span class="section"><a href="signals2/thread-safety.html#id-1.3.34.7.3">Signals and combiners</a></span></dt>
<dt><span class="section"><a href="signals2/thread-safety.html#id-1.3.34.7.4">Connections and other classes</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="signals2/faq.html">Frequently Asked Questions</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html">Design Rationale</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.2">User-level Connection Management</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.3">Automatic Connection Management</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.4"><code class="computeroutput">optional_last_value</code> as the Default Combiner</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.5">Combiner Interface</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.6">Connection Interfaces: +=  operator</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.7">Signals2 Mutex Classes</a></span></dt>
<dt><span class="section"><a href="signals2/rationale.html#id-1.3.34.9.8">Comparison with other Signal/Slot implementations</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="signals2/api_changes.html">Signals2 API Changes</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="signals2/api_changes.html#signals2.porting">Porting from Boost.Signals to Boost.Signals2</a></span></dt>
<dt><span class="section"><a href="signals2/api_changes.html#signals2.api_history">Signals2 API Development</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="signals2/tests.html">Testsuite</a></span></dt>
<dd><dl><dt><span class="section"><a href="signals2/tests.html#id-1.3.34.11.2">Acceptance tests</a></span></dt></dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.3.34.3"></a>Introduction</h2></div></div></div>
<div class="toc"><dl class="toc"><dt><span class="section"><a href="signals2.html#id-1.3.34.3.5">Signals2</a></span></dt></dl></div>
<p>The Boost.Signals2 library is an implementation of a managed
  signals and slots system. Signals represent callbacks with multiple
  targets, and are also called publishers or events in similar
  systems. Signals are connected to some set of slots, which are
  callback receivers (also called event targets or subscribers), which
  are called when the signal is "emitted."</p>
<p>Signals and slots are managed, in that signals and slots (or,
  more properly, objects that occur as part of the slots) can track
  connections and are capable of automatically disconnecting signal/slot
  connections when either is destroyed. This enables the user to make
  signal/slot connections without expending a great effort to manage the
  lifetimes of those connections with regard to the lifetimes of all
  objects involved.</p>
<p>When signals are connected to multiple slots, there is a
  question regarding the relationship between the return values of the
  slots and the return value of the signals. Boost.Signals2 allows the
  user to specify the manner in which multiple return values are
  combined.</p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.3.34.3.5"></a>Signals2</h3></div></div></div>
<p>This documentation describes a thread-safe variant of the
    original Boost.Signals library.  There have been some changes to
    the interface to support thread-safety, mostly with respect to
    automatic connection management.  This implementation was written by
    Frank Mori Hess.  Acknowledgements are also due to Timmo Stange, Peter
    Dimov, and Tony Van Eerd for ideas and feedback, and to Douglas Gregor
    for the original version of Boost.Signals this effort was based on.
    </p>
</div>
</div>
</div>
<div class="copyright-footer"></div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ratio/appendices.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="signals2/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
